Page({
    data: {
        items: [ {
            name: "10",
            value: "10题"
        }, {
            name: "20",
            value: "20题",
            checked: "true"
        }, {
            name: "50",
            value: "50题"
        } ],
        subjects: [],
        subject: [ {
            subkey: [ {
                id: "20100",
                subTitle: "20以内的加减运算"
            }, {
                id: "20200",
                subTitle: "20以内的连加连减"
            } ]
        }, {
            subkey: [ {
                id: "50100",
                subTitle: "50以内的加减运算"
            }, {
                id: "50200",
                subTitle: "50以内的连加连减"
            } ]
        }, {
            subkey: [ {
                id: "10010",
                subTitle: "100以内的加减法"
            }, {
                id: "10020",
                subTitle: "100以内的连加连减"
            } ]
        }, {
            subkey: [ {
                id: "10001",
                subTitle: "千以内的加减运算"
            }, {
                id: "10002",
                subTitle: "千以内的连加连减"
            } ]
        }, {
            subkey: [ {
                id: "xyz01",
                subTitle: "小数的加减运算"
            }, {
                id: "xyz02",
                subTitle: "小数的连加连减"
            } ]
        }, {
            subkey: [ {
                id: "2a100",
                subTitle: "两位数乘以一位数"
            }, {
                id: "2b100",
                subTitle: "两位数除以一位数"
            } ]
        }, {
            subkey: [ {
                id: "3a100",
                subTitle: "三位数乘以一位数"
            }, {
                id: "3b100",
                subTitle: "三位数除以一位数"
            } ]
        }, {
            subkey: [ {
                id: "2a200",
                subTitle: "两位数乘以两位数"
            }, {
                id: "3b200",
                subTitle: "三位数除以两位数"
            } ]
        }, {
            subkey: [ {
                id: "3a200",
                subTitle: "三位数乘以两位数"
            } ]
        }, {
            subkey: [ {
                id: "xyz11",
                subTitle: "小数的乘法运算"
            }, {
                id: "xyz22",
                subTitle: "小数的除法运算"
            } ]
        }, {
            subkey: [ {
                id: "xyz33",
                subTitle: "带余数的除法运算"
            }, {
                id: "xyzab",
                subTitle: "加减乘除混合运算"
            } ]
        } ],
        qty: 20
    },
    onLoad: function() {},
    radioChange: function(e) {
        this.setData({
            qty: e.detail.value
        });
    },
    playTap: function(e) {
        for (var t = e.currentTarget.dataset, i = "", s = 0; s < this.data.subject.length; s++) for (var u = 0; u < this.data.subject[s].subkey.length; u++) t.id == this.data.subject[s].subkey[u].id && (i = this.data.subject[s].subkey[u].subTitle);
        wx.navigateTo({
            url: "show/show?id=" + t.id + "&subTitle=" + i + "&qty=" + this.data.qty
        });
    },
    onShareAppMessage: function() {
        return {
            title: "算术题生成器",
            path: "/packageA/suanshu/index"
        };
    },
    onShareTimeline: function(e) {
        return {
            title: "算术题生成器",
            path: "/packageA/suanshu/index"
        };
    }
});